package com.srit.migration.business.dao.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

import com.srit.base.bean.Page;
import com.srit.base.dao.SqlMapDao;
import com.srit.migration.business.bean.ColType;
import com.srit.migration.business.dao.ColTypeDao;

/**
 * @author guan
 * @by daoImpl.tem
 * 
 */
 @Service
public class ColTypeDaoImpl implements ColTypeDao {
	@Autowired(required = true)
	private SqlMapDao sqlMapDao;

	@Override
	public void save(ColType colType) {
		sqlMapDao.save("ColType.save", colType);
	}

	@Override
	public void update(ColType colType) {
		sqlMapDao.update("ColType.save", colType);
	}

	@Override
	public ColType getById(ColType colType) {
		return (ColType) sqlMapDao.getById("ColType.getById", colType.getId());
	}

	@Override
	public void delete(ColType colType) {
		sqlMapDao.delete("ColType.delete", colType);
	}

	@Override
	public void page(Page page) {
		sqlMapDao.queryForObject("ColType.page", page);
	}
	
	@Override
	public void batchSave(List<ColType> colTypeList) {
		sqlMapDao.batchSave("ColType.batchSave", colTypeList);

	}

	@Override
	public List list(Page page) {
		return sqlMapDao.queryForList("ColType.list", page);

	}

}
